/*
 * @Author: wuzhen
 * @Date: 2019-01-22 11:25:29
 * @LastEditors: wuzhen
 * @LastEditTime: 2019-10-26 10:39:17
 * @Description: 注册全局组件， 过滤器， 方法。。。
 */
// 扩展方法
import * as utils from "@/config/utils";
// 表格
import Table from "./Table/";
// 表格搜索
import SearchTable from "./SearchTable/";
// 表单
import Form from "./Form/";
// 数字递增
import CountUp from "./CountUp/";
// 数字盒子
import InforCard from "./InforCard/";
// 图片预览
import PreImg from "./PreImg/";
// 视频预览
import PreVideo from "./PreVideo/";

const plugin = {
  wzTable: Table,
  SearchTable: SearchTable,
  wzForm: Form,
  CountUp: CountUp,
  InforCard: InforCard,
  PreImg: PreImg,
  PreVideo: PreVideo
};

export default {
  install(Vue) {
    for (const k in plugin) {
      Vue.component(k, plugin[k]);
    }
    /* 扩展方法 */
    for (let prop in utils) {
      Vue.prototype["$" + prop] = utils[prop];
    }
  }
};
